<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf8">
            <script language="javascript">
            //首先在JS代码中加入对事先约定好的 ScriptMessage（JS事件）的调用
            //window.webkit.messageHandlers.<事件名>.postMessage(需要传递的数据)
            //注意：目前测试来看，postMessage(3)必须要传参数，没有的话就放个占位参数，否则OC收不到响应。
        function changeOrientation() {
            window.webkit.messageHandlers.changeOrientation.postMessage("1");
        }
        function selectBrowse() {
            window.webkit.messageHandlers.selectBrowse.postMessage("6");
        }
        function saveFloorId() {
            window.webkit.messageHandlers.saveFloorId.postMessage("1234321");
        }
        function refreshPage(str){
            alert(str);
        }
           
        
        </script>
        
        <style>
            button {
                width:500px;
                height:100px;
                font-size:30px;
            }
        
        </style>
    </head>
    
    <body>
        <br/>
        <br/>
        <button type="button" onclick="changeOrientation()">changeOrientation</button>
        <br/>
        <br/>
        <button type="button" onclick="selectBrowse()">selectBrowse</button>
        <br/>
        <br/>
        <button type="button" onclick="saveFloorId()">saveFloorId</button>
        
    </body>
</html>
